Skip to content

feat: provide group-level view#18

Open
perfectra1n wants to merge 4 commits intoHandfish:mainfrom
perfectra1n:feat/provide-group-overview
Open

feat: provide group-level view#18
perfectra1n wants to merge 4 commits intoHandfish:mainfrom
perfectra1n:feat/provide-group-overview

Conversation

@perfectra1n
Copy link
Copy Markdown
Contributor

WindowsTerminal_0Ijiy80Zvf

This PR enables hotkeys (L, p, n, s, d) to work on group headers (Control Plane, Workers) in the TUI, showing aggregated views for all nodes in that group. Users can toggle between Interleaved (all nodes merged by timestamp) and ByNode (tabbed per-node) display modes.

Group Hotkeys

When highlighting a Control Plane or Workers group header, the following hotkeys now work:

Hotkey View Description
L Logs Stream logs from all nodes in the group
p Processes View processes running on all nodes
n Network View network stats from all nodes
s Storage View disks and volumes from all nodes
d Diagnostics Run diagnostic checks on all nodes

View Modes

  • Interleaved (default): All data merged and sorted, with hostname: prefix to identify source
  • ByNode: Tabbed interface showing one node's data at a time

New Keybindings (Group Views)

Key Action
v Toggle between Interleaved and ByNode view modes
[ Switch to previous node tab (ByNode mode)
] Switch to next node tab (ByNode mode)

Changes to "core" functionality:

  • action.rs - Added 5 new action variants (ShowGroupLogs, ShowGroupProcesses, ShowGroupNetwork, ShowGroupStorage, ShowGroupDiagnostics)
  • cluster.rs - Added current_group_nodes() and common_services_for_group() helpers; updated hotkey handlers to detect group selection
  • app.rs - Added handlers for all group actions with proper client setup for refresh

Components that were added:

  • multi_logs.rs - Added GroupViewMode, multi-node streaming, view toggle, tab navigation
  • processes.rs - Added group view support with new_group(), refresh_group(), view toggle
  • network.rs - Added group view support with new_group(), refresh_group(), view toggle
  • storage.rs - Added group view support with new_group(), refresh_group(), view toggle
  • diagnostics/mod.rs - Added group view support with new_group(), refresh_group(), view toggle

Architecture

User presses 'L' on "Control Plane" header
    │
    ▼
cluster.rs: current_group_nodes() returns (group_name, role, nodes)
    │
    ▼
cluster.rs: Emits Action::ShowGroupLogs(group_name, role, nodes, services)
    │
    ▼
app.rs: Creates MultiLogsComponent::new_group()
    │
    ├─► Fetches initial logs from all nodes
    ├─► Sets client for refresh capability
    └─► Starts multi-node streaming
    │
    ▼
multi_logs.rs: Renders with GroupViewMode (Interleaved or ByNode)

View Mode Toggle Flow

Interleaved Mode                    ByNode Mode
┌─────────────────────┐            ┌─────────────────────┐
│ All nodes merged    │            │ [node1] [node2] ... │
│ sorted by timestamp │ ◄── v ──►  │ ─────────────────── │
│ hostname:service    │            │ Selected node only  │
└─────────────────────┘            └─────────────────────┘
                                        ▲         ▲
                                        │         │
                                       [←]       [→]
                                   (prev tab) (next tab)

Also added some Unit Tests:

File Tests Coverage
cluster.rs 11 current_group_nodes(), common_services_for_group()
network.rs 6 get_display_devices()
storage.rs 12 get_display_disks(), get_display_volumes()
diagnostics/mod.rs 8 get_display_data()

No breaking changes. All existing functionality is preserved. Single-node hotkeys work exactly as before. Let me know if you hate anything/everything. I know that this many lines of code increases the maintenance burden, but hopefully this adds enough features to be worth it.

@Handfish Handfish force-pushed the feat/provide-group-overview branch from 2f3a729 to 56f186e Compare January 21, 2026 03:24
@Handfish
Copy link
Copy Markdown
Owner

I'm going to spend a little bit of time revising the network screen and make sure the RX / TX, network capture, conns sub-screen all work on a group view. I may play also around with the UI a bit - otherwise this is a great PR in progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants